package com.jokey.vue.service;

import com.baomidou.mybatisplus.extension.service.IService;
import com.jokey.vue.model.Menu;

import java.util.List;

/**
 * @author: JokeyZheng
 * @email: zhengjingfeng@ruqimobility.com
 * @created: 2021/11/26 15:36
 * @version: v1.0.0
 */
public interface MenuService extends IService<Menu> {

    /**
     * 获取所有菜单
     *
     * @return
     */
    List<Menu> getAllMenus();

    /**
     * 查询Hr的菜单
     *
     * @return
     */
    List<Menu> getMenusByHrId();

    /**
     * 获取角色的菜单
     *
     * @return
     */
    List<Menu> getAllMenusWithRole();

    /**
     * 根据角色ID查询菜单ID
     *
     * @param rid
     * @return
     */
    List<Integer> getMidsByRid(Integer rid);

    /**
     * 更新菜单角色关系
     *
     * @param rid
     * @param mids
     * @return
     */
    boolean updateMenuRole(Integer rid, Integer[] mids);

}
